package com.zhang.controller;

import com.zhang.domain.LoginDto;
import com.zhang.service.ILoginInfoService;
import com.zhang.util.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zh
 * @create 2022-03-03 16:47
 */
@RestController
@RequestMapping("login")
public class LoginInfoController {
    @Resource
    private ILoginInfoService service;
    @PostMapping("account")
    public AjaxResult login(@RequestBody LoginDto loginDto){
        AjaxResult ajaxResult = service.login(loginDto);
        return ajaxResult;
    }
}
